package com.tanhua.server.controller;

import com.easemob.im.server.api.user.get.UserGet;
import com.tanhua.server.interceptors.UserHolder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/huanxin")
public class HuanxinController {

    @GetMapping(value = "/user",name = "获取环信账户")
    public ResponseEntity queryHuanxinUser(){
        Map<String,String> map = new HashMap();
        map.put("username", UserHolder.getUserId().toString()); //注意 这里要的是字符串
        map.put("password", "123456");

        System.out.println("获取环信账户。。。。。。。。。");
        return ResponseEntity.ok(map);
    }
}
